package com.wh.system.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wh.system.pojo.Menu;
import com.wh.system.pojo.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface MenuDao extends BaseMapper<Menu> {
    List<Menu> findByPage(@Param("page") IPage<Menu> page, @Param("qw") QueryWrapper<Menu> qw);

    /**
     * 根据角色id查询菜单men
     */
    List<Long> findMenuIdsByRoleId(Long roleId);

    List<Menu> getMenusByLogininfoId(Long id);

    List<Menu> selectall();
}
